Cells

Cell

AnchorCell

class N2D2.AnchorCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

BatchNormCell

class N2D2.BatchNormCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBiasSolver(self: N2D2.BatchNormCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getEpsilon(self: N2D2.BatchNormCell) → float
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMovingAverageMomentum(self: N2D2.BatchNormCell) → float
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getScaleSolver(self: N2D2.BatchNormCell)N2D2.Solver
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBiasSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setScaleSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None

Cell

class N2D2.Cell

Cell is the base object for any kind of layer composing a deep network. It provides the base interface required.

class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ConvCell

class N2D2.ConvCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None

DeconvCell

class N2D2.DeconvCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.DeconvCell)N2D2.Filler
getBiasSolver(self: N2D2.DeconvCell)N2D2.Solver
getBiases(self: N2D2.DeconvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDilationX(self: N2D2.DeconvCell) → int
getDilationY(self: N2D2.DeconvCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.DeconvCell) → int
getKernelWidth(self: N2D2.DeconvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.DeconvCell) → int
getPaddingY(self: N2D2.DeconvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getStrideX(self: N2D2.DeconvCell) → int
getStrideY(self: N2D2.DeconvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.DeconvCell)N2D2.Filler
getWeightsSolver(self: N2D2.DeconvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None

DropoutCell

class N2D2.DropoutCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDropout(self: N2D2.DropoutCell) → float
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ElemWiseCell

class N2D2.ElemWiseCell
class CoeffMode

Members:

PerLayer

PerInput

PerChannel

__init__(self: N2D2.ElemWiseCell.CoeffMode, value: int) → None
property name
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Operation

Members:

Sum

AbsSum

EuclideanSum

Prod

Max

__init__(self: N2D2.ElemWiseCell.Operation, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOperation(self: N2D2.ElemWiseCell)N2D2.ElemWiseCell.Operation
getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getShifts(self: N2D2.ElemWiseCell) → List[float]
getType(self: N2D2.Cell) → str

Get basic cell type

getWeights(self: N2D2.ElemWiseCell) → List[float]
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

FMPCell

class N2D2.FMPCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

FcCell

class N2D2.FcCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None

LRNCell

class N2D2.LRNCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

LSTMCell

class N2D2.LSTMCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

NormalizeCell

class N2D2.NormalizeCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Norm

Members:

L1

L2

__init__(self: N2D2.NormalizeCell.Norm, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ObjectDetCell

class N2D2.ObjectDetCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

PaddingCell

class N2D2.PaddingCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBotPad(self: N2D2.PaddingCell) → int
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getLeftPad(self: N2D2.PaddingCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getRightPad(self: N2D2.PaddingCell) → int
getTopPad(self: N2D2.PaddingCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

PoolCell

class N2D2.PoolCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ProposalCell

class N2D2.ProposalCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ROIPoolingCell

class N2D2.ROIPoolingCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class ROIPooling

Members:

Max

Average

Bilinear

BilinearTF

__init__(self: N2D2.ROIPoolingCell.ROIPooling, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

RPCell

class N2D2.RPCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ResizeCell

class N2D2.ResizeCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class ResizeMode

Members:

Bilinear

BilinearTF

NearestNeighbor

__init__(self: N2D2.ResizeCell.ResizeMode, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ScalingCell

class N2D2.ScalingCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

SoftmaxCell

class N2D2.SoftmaxCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getGroupSize(self: N2D2.SoftmaxCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

getWithLoss(self: N2D2.SoftmaxCell) → bool
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

TargetBiasCell

class N2D2.TargetBiasCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ThresholdCell

class N2D2.ThresholdCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

TransformationCell

class N2D2.TransformationCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

UnpoolCell

class N2D2.UnpoolCell
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.UnpoolCell.Pooling, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

Frame

AnchorCell_Frame

class N2D2.AnchorCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.AnchorCell_Frame, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, anchors: List[N2D2.Anchor], scoresCls: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

AnchorCell_Frame_CUDA

class N2D2.AnchorCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.AnchorCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, anchors: List[N2D2.Anchor], scoresCls: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

BatchNormCell_Frame_float

class N2D2.BatchNormCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.BatchNormCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb7af0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBiasSolver(self: N2D2.BatchNormCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getEpsilon(self: N2D2.BatchNormCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getMovingAverageMomentum(self: N2D2.BatchNormCell) → float
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getScaleSolver(self: N2D2.BatchNormCell)N2D2.Solver
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBiasSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setScaleSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

BatchNormCell_Frame_double

class N2D2.BatchNormCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.BatchNormCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_double object at 0x7ffa0dcb8970>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBiasSolver(self: N2D2.BatchNormCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getEpsilon(self: N2D2.BatchNormCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getMovingAverageMomentum(self: N2D2.BatchNormCell) → float
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getScaleSolver(self: N2D2.BatchNormCell)N2D2.Solver
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBiasSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setScaleSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

BatchNormCell_Frame_CUDA_float

class N2D2.BatchNormCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.BatchNormCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa11eef0b0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBiasSolver(self: N2D2.BatchNormCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getEpsilon(self: N2D2.BatchNormCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getMovingAverageMomentum(self: N2D2.BatchNormCell) → float
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getScaleSolver(self: N2D2.BatchNormCell)N2D2.Solver
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBiasSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setScaleSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

BatchNormCell_Frame_CUDA_double

class N2D2.BatchNormCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.BatchNormCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_double object at 0x7ffa0dcb8630>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBiasSolver(self: N2D2.BatchNormCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getEpsilon(self: N2D2.BatchNormCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getMovingAverageMomentum(self: N2D2.BatchNormCell) → float
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getScaleSolver(self: N2D2.BatchNormCell)N2D2.Solver
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBiasSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setScaleSolver(self: N2D2.BatchNormCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

Cell_Frame_float

class N2D2.Cell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

Cell_Frame_double

class N2D2.Cell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

Cell_Frame_CUDA_float

class N2D2.Cell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

Cell_Frame_CUDA_double

class N2D2.Cell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

Cell_Frame_Top

class N2D2.Cell_Frame_Top
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

load(self: N2D2.Cell_Frame_Top, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell_Frame_Top, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
update(self: N2D2.Cell_Frame_Top) → None

ConvCell_Frame_float

class N2D2.ConvCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Frame_float, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb2eb0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

ConvCell_Frame_double

class N2D2.ConvCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Frame_double, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb40b0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

ConvCell_Frame_CUDA_float

class N2D2.ConvCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa0dcb4a70>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

ConvCell_Frame_CUDA_double

class N2D2.ConvCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa0dcb4f70>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

DeconvCell_Frame_float

class N2D2.DeconvCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DeconvCell_Frame_float, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb8c30>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.DeconvCell)N2D2.Filler
getBiasSolver(self: N2D2.DeconvCell)N2D2.Solver
getBiases(self: N2D2.DeconvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.DeconvCell) → int
getDilationY(self: N2D2.DeconvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.DeconvCell) → int
getKernelWidth(self: N2D2.DeconvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.DeconvCell) → int
getPaddingY(self: N2D2.DeconvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getStrideX(self: N2D2.DeconvCell) → int
getStrideY(self: N2D2.DeconvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.DeconvCell)N2D2.Filler
getWeightsSolver(self: N2D2.DeconvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

DeconvCell_Frame_double

class N2D2.DeconvCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DeconvCell_Frame_double, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb88f0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.DeconvCell)N2D2.Filler
getBiasSolver(self: N2D2.DeconvCell)N2D2.Solver
getBiases(self: N2D2.DeconvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.DeconvCell) → int
getDilationY(self: N2D2.DeconvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.DeconvCell) → int
getKernelWidth(self: N2D2.DeconvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.DeconvCell) → int
getPaddingY(self: N2D2.DeconvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getStrideX(self: N2D2.DeconvCell) → int
getStrideY(self: N2D2.DeconvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.DeconvCell)N2D2.Filler
getWeightsSolver(self: N2D2.DeconvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

DeconvCell_Frame_CUDA_float

class N2D2.DeconvCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DeconvCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa0dcb8fb0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.DeconvCell)N2D2.Filler
getBiasSolver(self: N2D2.DeconvCell)N2D2.Solver
getBiases(self: N2D2.DeconvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.DeconvCell) → int
getDilationY(self: N2D2.DeconvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.DeconvCell) → int
getKernelWidth(self: N2D2.DeconvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.DeconvCell) → int
getPaddingY(self: N2D2.DeconvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getStrideX(self: N2D2.DeconvCell) → int
getStrideY(self: N2D2.DeconvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.DeconvCell)N2D2.Filler
getWeightsSolver(self: N2D2.DeconvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

DeconvCell_Frame_CUDA_double

class N2D2.DeconvCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DeconvCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1], activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa0dcbb3f0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.DeconvCell)N2D2.Filler
getBiasSolver(self: N2D2.DeconvCell)N2D2.Solver
getBiases(self: N2D2.DeconvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDilationX(self: N2D2.DeconvCell) → int
getDilationY(self: N2D2.DeconvCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.DeconvCell) → int
getKernelWidth(self: N2D2.DeconvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.DeconvCell) → int
getPaddingY(self: N2D2.DeconvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getStrideX(self: N2D2.DeconvCell) → int
getStrideY(self: N2D2.DeconvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.DeconvCell)N2D2.Filler
getWeightsSolver(self: N2D2.DeconvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.DeconvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setWeight(self: N2D2.DeconvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.DeconvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.DeconvCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

DropoutCell_Frame_float

class N2D2.DropoutCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DropoutCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDropout(self: N2D2.DropoutCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

DropoutCell_Frame_double

class N2D2.DropoutCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DropoutCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDropout(self: N2D2.DropoutCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

DropoutCell_Frame_CUDA_float

class N2D2.DropoutCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DropoutCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDropout(self: N2D2.DropoutCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

DropoutCell_Frame_CUDA_double

class N2D2.DropoutCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.DropoutCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getDropout(self: N2D2.DropoutCell) → float
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ElemWiseCell_Frame

class N2D2.ElemWiseCell_Frame
class CoeffMode

Members:

PerLayer

PerInput

PerChannel

__init__(self: N2D2.ElemWiseCell.CoeffMode, value: int) → None
property name
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Operation

Members:

Sum

AbsSum

EuclideanSum

Prod

Max

__init__(self: N2D2.ElemWiseCell.Operation, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ElemWiseCell_Frame, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, operation: N2D2.ElemWiseCell.Operation = <Operation.Sum: 0>, mode: N2D2.ElemWiseCell.CoeffMode = <CoeffMode.PerLayer: 0>, weights: List[float] = [], shifts: List[float] = [], activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOperation(self: N2D2.ElemWiseCell)N2D2.ElemWiseCell.Operation
getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getShifts(self: N2D2.ElemWiseCell) → List[float]
getType(self: N2D2.Cell) → str

Get basic cell type

getWeights(self: N2D2.ElemWiseCell) → List[float]
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ElemWiseCell_Frame_CUDA

class N2D2.ElemWiseCell_Frame_CUDA
class CoeffMode

Members:

PerLayer

PerInput

PerChannel

__init__(self: N2D2.ElemWiseCell.CoeffMode, value: int) → None
property name
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Operation

Members:

Sum

AbsSum

EuclideanSum

Prod

Max

__init__(self: N2D2.ElemWiseCell.Operation, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ElemWiseCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, operation: N2D2.ElemWiseCell.Operation = <Operation.Sum: 0>, mode: N2D2.ElemWiseCell.CoeffMode = <CoeffMode.PerLayer: 0>, weights: List[float] = [], shifts: List[float] = [], activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOperation(self: N2D2.ElemWiseCell)N2D2.ElemWiseCell.Operation
getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getShifts(self: N2D2.ElemWiseCell) → List[float]
getType(self: N2D2.Cell) → str

Get basic cell type

getWeights(self: N2D2.ElemWiseCell) → List[float]
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

FMPCell_Frame

class N2D2.FMPCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.FMPCell_Frame, deepNet: N2D2.DeepNet, name: str, scalingRatio: float, nbOutputs: int, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

FMPCell_Frame_CUDA

class N2D2.FMPCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.FMPCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, scalingRatio: float, nbOutputs: int, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

FcCell_Frame_float

class N2D2.FcCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb7830>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

FcCell_Frame_double

class N2D2.FcCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_float object at 0x7ffa0dcb7970>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

FcCell_Frame_CUDA_float

class N2D2.FcCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa0dcb79f0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

FcCell_Frame_CUDA_double

class N2D2.FcCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, activation: N2D2.Activation = <N2D2.TanhActivation_Frame_CUDA_float object at 0x7ffa0dcb7a70>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
update(self: N2D2.Cell_Frame_Top) → None

LRNCell_Frame_float

class N2D2.LRNCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.LRNCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

LRNCell_Frame_double

class N2D2.LRNCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.LRNCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

LRNCell_Frame_CUDA_float

class N2D2.LRNCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.LRNCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

LRNCell_Frame_CUDA_double

class N2D2.LRNCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.LRNCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

LSTMCell_Frame_CUDA_float

class N2D2.LSTMCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.LSTMCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, seqLength: int, batchSize: int, inputDim: int, numberLayers: int, hiddenSize: int, algo: int, nbOutputs: int, bidirectional: int, inputMode: int, dropout: float, singleBackpropFeeding: bool) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

LSTMCell_Frame_CUDA_double

class N2D2.LSTMCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.LSTMCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, seqLength: int, batchSize: int, inputDim: int, numberLayers: int, hiddenSize: int, algo: int, nbOutputs: int, bidirectional: int, inputMode: int, dropout: float, singleBackpropFeeding: bool) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

NormalizeCell_Frame_float

class N2D2.NormalizeCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Norm

Members:

L1

L2

__init__(self: N2D2.NormalizeCell.Norm, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.NormalizeCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, norm: N2D2.NormalizeCell.Norm) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

NormalizeCell_Frame_double

class N2D2.NormalizeCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Norm

Members:

L1

L2

__init__(self: N2D2.NormalizeCell.Norm, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.NormalizeCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, norm: N2D2.NormalizeCell.Norm) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

NormalizeCell_Frame_CUDA_float

class N2D2.NormalizeCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Norm

Members:

L1

L2

__init__(self: N2D2.NormalizeCell.Norm, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.NormalizeCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, norm: N2D2.NormalizeCell.Norm) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

NormalizeCell_Frame_CUDA_double

class N2D2.NormalizeCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Norm

Members:

L1

L2

__init__(self: N2D2.NormalizeCell.Norm, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.NormalizeCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, norm: N2D2.NormalizeCell.Norm) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ObjectDetCell_Frame

class N2D2.ObjectDetCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ObjectDetCell_Frame, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, nbOutputs: int, nbAnchors: int, nbProposals: int, nbClass: int, nmsThreshold: float = 0.5, scoreThreshold: List[float] = [0.5], numParts: List[int] = [], numTemplates: List[int] = [], anchors: List[N2D2.Anchor] = []) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ObjectDetCell_Frame_CUDA

class N2D2.ObjectDetCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ObjectDetCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, nbOutputs: int, nbAnchors: int, nbProposals: int, nbClass: int, nmsThreshold: float = 0.5, scoreThreshold: List[float] = [0.5], numParts: List[int] = [], numTemplates: List[int] = [], anchors: List[N2D2.Anchor] = []) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PaddingCell_Frame

class N2D2.PaddingCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PaddingCell_Frame, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, topPad: int = 0, botPad: int = 0, leftPad: int = 0, rightPad: int = 0) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBotPad(self: N2D2.PaddingCell) → int
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getLeftPad(self: N2D2.PaddingCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getRightPad(self: N2D2.PaddingCell) → int
getTopPad(self: N2D2.PaddingCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PaddingCell_Frame_CUDA

class N2D2.PaddingCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PaddingCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, topPad: int = 0, botPad: int = 0, leftPad: int = 0, rightPad: int = 0) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBotPad(self: N2D2.PaddingCell) → int
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getLeftPad(self: N2D2.PaddingCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getRightPad(self: N2D2.PaddingCell) → int
getTopPad(self: N2D2.PaddingCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PoolCell_Frame_float

class N2D2.PoolCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PoolCell_Frame_float, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PoolCell_Frame_double

class N2D2.PoolCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PoolCell_Frame_double, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PoolCell_Frame_CUDA_float

class N2D2.PoolCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PoolCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PoolCell_Frame_CUDA_double

class N2D2.PoolCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PoolCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PoolCell_Frame_EXT_CUDA_float

class N2D2.PoolCell_Frame_EXT_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PoolCell_Frame_EXT_CUDA_float, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

PoolCell_Frame_EXT_CUDA_double

class N2D2.PoolCell_Frame_EXT_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.PoolCell_Frame_EXT_CUDA_double, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ProposalCell_Frame

class N2D2.ProposalCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ProposalCell_Frame, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, nbOutputs: int, nbProposals: int, scoreIndex: int = 0, IoUIndex: int = 5, isNms: bool = False, meansFactor: List[float] = [], stdFactor: List[float] = [], numParts: List[int] = [], numTemplates: List[int] = []) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ProposalCell_Frame_CUDA

class N2D2.ProposalCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ProposalCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, nbOutputs: int, nbProposals: int, scoreIndex: int = 0, IoUIndex: int = 5, isNms: bool = False, meansFactor: List[float] = [], stdFactor: List[float] = [], numParts: List[int] = [], numTemplates: List[int] = []) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ROIPoolingCell_Frame

class N2D2.ROIPoolingCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class ROIPooling

Members:

Max

Average

Bilinear

BilinearTF

__init__(self: N2D2.ROIPoolingCell.ROIPooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ROIPoolingCell_Frame, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, outputsWidth: int, outputsHeight: int, nbOutputs: int, pooling: N2D2.ROIPoolingCell.ROIPooling) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ROIPoolingCell_Frame_CUDA

class N2D2.ROIPoolingCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class ROIPooling

Members:

Max

Average

Bilinear

BilinearTF

__init__(self: N2D2.ROIPoolingCell.ROIPooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ROIPoolingCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, sp: N2D2.StimuliProvider, outputsWidth: int, outputsHeight: int, nbOutputs: int, pooling: N2D2.ROIPoolingCell.ROIPooling) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

RPCell_Frame

class N2D2.RPCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.RPCell_Frame, deepNet: N2D2.DeepNet, name: str, nbAnchors: int, nbProposals: int, scoreIndex: int = 0, IoUIndex: int = 5) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

RPCell_Frame_CUDA

class N2D2.RPCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.RPCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, nbAnchors: int, nbProposals: int, scoreIndex: int = 0, IoUIndex: int = 5) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ResizeCell_Frame

class N2D2.ResizeCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class ResizeMode

Members:

Bilinear

BilinearTF

NearestNeighbor

__init__(self: N2D2.ResizeCell.ResizeMode, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ResizeCell_Frame, deepNet: N2D2.DeepNet, name: str, outputsWidth: int, outputsHeight: int, nbOutputs: int, resizeMode: N2D2.ResizeCell.ResizeMode) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ResizeCell_Frame_CUDA

class N2D2.ResizeCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class ResizeMode

Members:

Bilinear

BilinearTF

NearestNeighbor

__init__(self: N2D2.ResizeCell.ResizeMode, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ResizeCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, outputsWidth: int, outputsHeight: int, nbOutputs: int, resizeMode: N2D2.ResizeCell.ResizeMode) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ScalingCell_Frame_float

class N2D2.ScalingCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ScalingCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, scaling: N2D2.Scaling) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ScalingCell_Frame_double

class N2D2.ScalingCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ScalingCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, scaling: N2D2.Scaling) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ScalingCell_Frame_CUDA_float

class N2D2.ScalingCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ScalingCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, scaling: N2D2.Scaling) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ScalingCell_Frame_CUDA_double

class N2D2.ScalingCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ScalingCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, scaling: N2D2.Scaling) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

SoftmaxCell_Frame_float

class N2D2.SoftmaxCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.SoftmaxCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, withLoss: bool = False, groupSize: int = 0) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.SoftmaxCell_Frame_float) → None
checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getGroupSize(self: N2D2.SoftmaxCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

getWithLoss(self: N2D2.SoftmaxCell) → bool
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.SoftmaxCell_Frame_float, inference: bool = False) → None
save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.SoftmaxCell_Frame_float) → None

SoftmaxCell_Frame_double

class N2D2.SoftmaxCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.SoftmaxCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, withLoss: bool = False, groupSize: int = 0) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.SoftmaxCell_Frame_double) → None
checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getGroupSize(self: N2D2.SoftmaxCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

getWithLoss(self: N2D2.SoftmaxCell) → bool
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.SoftmaxCell_Frame_double, inference: bool = False) → None
save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.SoftmaxCell_Frame_double) → None

SoftmaxCell_Frame_CUDA_float

class N2D2.SoftmaxCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.SoftmaxCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, withLoss: bool = False, groupSize: int = 0) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getGroupSize(self: N2D2.SoftmaxCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

getWithLoss(self: N2D2.SoftmaxCell) → bool
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

SoftmaxCell_Frame_CUDA_double

class N2D2.SoftmaxCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.SoftmaxCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, withLoss: bool = False, groupSize: int = 0) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getGroupSize(self: N2D2.SoftmaxCell) → int
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

getWithLoss(self: N2D2.SoftmaxCell) → bool
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

TargetBiasCell_Frame_float

class N2D2.TargetBiasCell_Frame_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.TargetBiasCell_Frame_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, bias: float) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

TargetBiasCell_Frame_double

class N2D2.TargetBiasCell_Frame_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.TargetBiasCell_Frame_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, bias: float) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_double, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

TargetBiasCell_Frame_CUDA_float

class N2D2.TargetBiasCell_Frame_CUDA_float
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.TargetBiasCell_Frame_CUDA_float, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, bias: float) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

TargetBiasCell_Frame_CUDA_double

class N2D2.TargetBiasCell_Frame_CUDA_double
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.TargetBiasCell_Frame_CUDA_double, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, bias: float) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_double, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_double) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_double, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_double, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_double, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_double) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_double, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ThresholdCell_Frame

class N2D2.ThresholdCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ThresholdCell_Frame, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, threshold: float) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

ThresholdCell_Frame_CUDA

class N2D2.ThresholdCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.ThresholdCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, threshold: float) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

TransformationCell_Frame

class N2D2.TransformationCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.TransformationCell_Frame, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, transformation: N2D2.Transformation) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

TransformationCell_Frame_CUDA

class N2D2.TransformationCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.TransformationCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, nbOutputs: int, transformation: N2D2.Transformation) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

UnpoolCell_Frame

class N2D2.UnpoolCell_Frame
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.UnpoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.UnpoolCell_Frame, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.UnpoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_float, diffInput: N2D2.Tensor_float) → None
setDiffInputsValid(self: N2D2.Cell_Frame_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_Top, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

UnpoolCell_Frame_CUDA

class N2D2.UnpoolCell_Frame_CUDA
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.UnpoolCell.Pooling, value: int) → None
property name
class Signals

Members:

In

Out

InOut

__init__(self: N2D2.Cell_Frame_Top.Signals, value: int) → None
property name
__init__(self: N2D2.UnpoolCell_Frame_CUDA, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.UnpoolCell.Pooling = <Pooling.Max: 0>, activation: N2D2.Activation = None) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addInputBis(self: N2D2.Cell_Frame_Top, inputs: N2D2.BaseTensor, diffOutputs: N2D2.BaseTensor) → None
addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

applyLoss(self: N2D2.Cell_Frame_CUDA_float, targetVal: float, defaultVal: float) → float
backPropagate(self: N2D2.Cell_Frame_Top) → None

Back propagation of the error

checkGradient(self: N2D2.Cell_Frame_Top, epsilon: float, maxError: float) → None
clearInputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
clearInputs()

Clear input Cells

clearOutputTensors(self: N2D2.Cell_Frame_CUDA_float) → None
exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getActivation(self: N2D2.Cell_Frame_Top)N2D2.Activation
getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDiffInputs(self: N2D2.Cell_Frame_Top)N2D2.BaseTensor
getDiffOutputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputs(self: N2D2.Cell_Frame_Top, index: int = 0)N2D2.BaseTensor
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getMaxOutput(self: N2D2.Cell_Frame_Top, batchPos: int = 0) → int
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputs(*args, **kwargs)

Overloaded function.

  1. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

  2. getOutputs(self: N2D2.Cell_Frame_Top) -> N2D2.BaseTensor

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
linkInput(*args, **kwargs)

Overloaded function.

  1. linkInput(self: N2D2.Cell_Frame_CUDA_float, cell: N2D2.Cell) -> None

  2. linkInput(self: N2D2.Cell_Frame_CUDA_float, sp: N2D2.StimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0) -> None

load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

propagate(self: N2D2.Cell_Frame_Top, inference: bool = False) → None

Forward propagation

param inference

If set to False we are in training mode else we are in inference mode

type inference

bool, optional

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setActivation(self: N2D2.Cell_Frame_Top, activation: N2D2.Activation) → None
setDiffInputs(self: N2D2.Cell_Frame_CUDA_float, diffInput: N2D2.BaseTensor) → None
setDiffInputsValid(self: N2D2.Cell_Frame_CUDA_float) → None
setOutputErrors(self: N2D2.Cell_Frame_Top, errors: N2D2.BaseTensor) → None
setOutputTarget(self: N2D2.Cell_Frame_CUDA_float, targets: N2D2.Tensor_int) → None
setOutputTargets(self: N2D2.Cell_Frame_Top, targets: N2D2.BaseTensor) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
update(self: N2D2.Cell_Frame_Top) → None

Spike

Cell_Spike

class N2D2.Cell_Spike
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None

ConvCell_Spike

class N2D2.ConvCell_Spike
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None

ConvCell_Spike_Analog

class N2D2.ConvCell_Spike_Analog
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Spike_Analog, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1]) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None

ConvCell_Spike_PCM

class N2D2.ConvCell_Spike_PCM
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Spike_PCM, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1]) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None

ConvCell_Spike_RRAM

class N2D2.ConvCell_Spike_RRAM
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OCHW

HWCO

__init__(self: N2D2.ConvCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.ConvCell_Spike_RRAM, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, kernelDims: List[int], nbOutputs: int, subSampleDims: List[int] = [1, 1], strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], dilationDims: List[int] = [1, 1]) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.ConvCell)N2D2.Filler
getBiasSolver(self: N2D2.ConvCell)N2D2.Solver
getBiases(self: N2D2.ConvCell)N2D2.BaseTensor
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getDilationX(self: N2D2.ConvCell) → int
getDilationY(self: N2D2.ConvCell) → int
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getKernelHeight(self: N2D2.ConvCell) → int
getKernelWidth(self: N2D2.ConvCell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.ConvCell) → int
getPaddingY(self: N2D2.ConvCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.ConvCell) → N2D2::QuantizerCell
getStrideX(self: N2D2.ConvCell) → int
getStrideY(self: N2D2.ConvCell) → int
getSubSampleX(self: N2D2.ConvCell) → int
getSubSampleY(self: N2D2.ConvCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.ConvCell)N2D2.Filler
getWeightsSolver(self: N2D2.ConvCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.ConvCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.ConvCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.ConvCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.ConvCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.ConvCell, solver: N2D2.Solver) → None

FcCell_Spike

class N2D2.FcCell_Spike
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None

FcCell_Spike_Analog

class N2D2.FcCell_Spike_Analog
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Spike_Analog, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None

FcCell_Spike_PCM

class N2D2.FcCell_Spike_PCM
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Spike_PCM, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None

FcCell_Spike_RRAM

class N2D2.FcCell_Spike_RRAM
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class WeightsExportFormat

Members:

OC

CO

__init__(self: N2D2.FcCell.WeightsExportFormat, value: int) → None
property name
__init__(self: N2D2.FcCell_Spike_RRAM, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, nbOutputs: int) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
getBiasFiller(self: N2D2.FcCell)N2D2.Filler
getBiasSolver(self: N2D2.FcCell)N2D2.Solver
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getQuantizer(self: N2D2.FcCell) → N2D2::QuantizerCell
getType(self: N2D2.Cell) → str

Get basic cell type

getWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
getWeightsFiller(self: N2D2.FcCell)N2D2.Filler
getWeightsSolver(self: N2D2.FcCell)N2D2.Solver
importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setBias(self: N2D2.FcCell, output: int, value: N2D2.BaseTensor) → None
setBiasFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setBiasSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None
setQuantizer(self: N2D2.FcCell, quantizer: N2D2::QuantizerCell) → None
setWeight(self: N2D2.FcCell, output: int, channel: int, value: N2D2.BaseTensor) → None
setWeightsFiller(self: N2D2.FcCell, filler: N2D2.Filler) → None
setWeightsSolver(self: N2D2.FcCell, solver: N2D2.Solver) → None

PoolCell_Spike

class N2D2.PoolCell_Spike
class FreeParametersType

Members:

Additive

Multiplicative

All

__init__(self: N2D2.Cell.FreeParametersType, value: int) → None
property name
class Pooling

Members:

Max

Average

__init__(self: N2D2.PoolCell.Pooling, value: int) → None
property name
__init__(self: N2D2.PoolCell_Spike, net: N2D2.Network, deepNet: N2D2.DeepNet, name: str, poolDims: List[int], nbOutputs: int, strideDims: List[int] = [1, 1], paddingDims: List[int] = [0, 0], pooling: N2D2.PoolCell.Pooling = <Pooling.Max: 0>) → None
addInput()

Connect an input filter from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • channel (int) – Channel number in the environment

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int) – Width

  • height (int) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map and the cell output maps (size of the vector = number of output maps in the cell)

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

Connect an input cell to the cell

Parameters
  • cell (N2D2.Cell) – Pointer to the input cell

  • mapping (N2D2.Tensor_bool, optional) – Connection between the input cell output maps (input channels) and the cell output maps (size of the matrix = number of output maps in the cell [cols] x number of input cell output maps (input channels) [rows])

Connect an input cell to the cell

Parameters
  • cell – Pointer to the input cell

  • x0 (int) – Left offset

  • y0 (int) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

addMultiscaleInput(self: N2D2.Cell, sp: N2D2::HeteroStimuliProvider, x0: int = 0, y0: int = 0, width: int = 0, height: int = 0, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb05b0>) → None

Connect all the input maps from the environment to the cell

Parameters
  • sp (N2D2.StimuliProvider) – N2D2 StimuliProvider object reference

  • x0 (int, optional) – Left offset

  • y0 (int, optional) – Top offset

  • width (int, optional) – Width

  • height (int, optional) – Height

  • mapping (N2D2.Tensor_bool, optional) – Connection between the environment map filters and the cell output maps (size of the matrix = number of output maps in the cell [cols] x total number of filters in the environment [rows])

clearInputs()

Clear input Cells

exportFreeParameters(self: N2D2.Cell, fileName: str) → None

Export cell free parameters to a file, in ASCII format compatible between the different cell models

Parameters

fileName (str) – Destination file

getAssociatedDeepNet(self: N2D2.Cell)N2D2.DeepNet
getChildrenCells(self: N2D2.Cell) → List[N2D2.Cell]
getInputsDims(self: N2D2.Cell) → List[int]
getInputsSize(self: N2D2.Cell) → int
getMapping(self: N2D2.Cell)N2D2.Tensor_bool
getName(self: N2D2.Cell) → str

Get the cell name

getNbChannels(self: N2D2.Cell) → int
getNbOutputs(self: N2D2.Cell) → int

Returns number of output maps in the cell (or number of outputs for 1D cells)

getOutputsHeight(self: N2D2.Cell) → int

Returns cell output maps height (returns 1 for 1D cells)

getOutputsWidth(self: N2D2.Cell) → int

Returns cell output maps width (returns 1 for 1D cells)

getPaddingX(self: N2D2.PoolCell) → int
getPaddingY(self: N2D2.PoolCell) → int
getParameterAndType(self: N2D2.Parameterizable, name: str) → Tuple[str, str]
getParameters(self: N2D2.Parameterizable) → Dict[str, str]
getParentsCells(self: N2D2.Cell) → List[N2D2.Cell]
getPoolHeight(self: N2D2.PoolCell) → int
getPoolWidth(self: N2D2.PoolCell) → int
getPooling(self: N2D2.PoolCell) → N2D2::PoolCell::Pooling
getStrideX(self: N2D2.PoolCell) → int
getStrideY(self: N2D2.PoolCell) → int
getType(self: N2D2.Cell) → str

Get basic cell type

importActivationParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load activation parameters from a file

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

importFreeParameters(self: N2D2.Cell, fileName: str, ignoreNotExists: bool = False) → None

Load cell free parameters from a file, in ASCII format compatible between the different cell models

Parameters
  • fileName (str) – Source file

  • ignoreNotExists (bool, optional) – If true, don’t throw an error if the file doesn’t exist

initialize(self: N2D2.Cell) → None

Initialize the state of the cell (e.g. weights random initialization)

initializeDataDependent(self: N2D2.Cell) → None
initializeParameters(self: N2D2.Cell, inputDimZ: int, nbInputs: int, mapping: N2D2.Tensor_bool = <N2D2.Tensor_bool object at 0x7ffa0dcb06f0>) → None
initializeWeightQuantizer(self: N2D2.Cell) → None
load(self: N2D2.Cell, dirName: str) → None

Load cell configuration and free parameters from a directory

Parameters

dirName (str) – Source directory

save(self: N2D2.Cell, dirName: str) → None

Save cell configuration and free parameters to a directory

Parameters

dirName (str) – Destination directory

saveFreeParameters(self: N2D2.Cell, fileName: str) → None
setParameter(self: N2D2.Parameterizable, name: str, value: str) → None